package com.ruoyi.cinema.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cinema.mapper.ComboGroupGoodsMapper;
import com.ruoyi.cinema.domain.ComboGroupGoods;
import com.ruoyi.cinema.service.IComboGroupGoodsService;

/**
 * 套餐组合内商品Service业务层处理
 *
 * @author HHAOYU
 * @date 2020-12-09
 */
@Service
public class ComboGroupGoodsServiceImpl extends ServiceImpl<ComboGroupGoodsMapper, ComboGroupGoods> implements IComboGroupGoodsService  {
    @Autowired
    private ComboGroupGoodsMapper comboGroupGoodsMapper;

    /**
     * 查询套餐组合内商品
     *
     * @param id 套餐组合内商品ID
     * @return 套餐组合内商品
     */
    @Override
    public ComboGroupGoods selectComboGroupGoodsById(Long id)
    {
        return comboGroupGoodsMapper.selectComboGroupGoodsById(id);
    }

    /**
     * 查询套餐组合内商品列表
     *
     * @param comboGroupGoods 套餐组合内商品
     * @return 套餐组合内商品
     */
    @Override
    public List<ComboGroupGoods> selectComboGroupGoodsList(ComboGroupGoods comboGroupGoods)
    {
        return comboGroupGoodsMapper.selectComboGroupGoodsList(comboGroupGoods);
    }

    /**
     * 新增套餐组合内商品
     *
     * @param comboGroupGoods 套餐组合内商品
     * @return 结果
     */
    @Override
    public int insertComboGroupGoods(ComboGroupGoods comboGroupGoods)
    {
        return comboGroupGoodsMapper.insertComboGroupGoods(comboGroupGoods);
    }

    /**
     * 修改套餐组合内商品
     *
     * @param comboGroupGoods 套餐组合内商品
     * @return 结果
     */
    @Override
    public int updateComboGroupGoods(ComboGroupGoods comboGroupGoods)
    {
        return comboGroupGoodsMapper.updateComboGroupGoods(comboGroupGoods);
    }

    /**
     * 批量删除套餐组合内商品
     *
     * @param ids 需要删除的套餐组合内商品ID
     * @return 结果
     */
    @Override
    public int deleteComboGroupGoodsByIds(Long[] ids)
    {
        return comboGroupGoodsMapper.deleteComboGroupGoodsByIds(ids);
    }

    /**
     * 删除套餐组合内商品信息
     *
     * @param id 套餐组合内商品ID
     * @return 结果
     */
    @Override
    public int deleteComboGroupGoodsById(Long id)
    {
        return comboGroupGoodsMapper.deleteComboGroupGoodsById(id);
    }
}
